#include <QtGui/QApplication>
#include <QtGui/QtGui>
#include "parser.h"
#include <iostream>

int main(int argc, char **argv)
{
    QApplication app(argc, argv);
    QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
    qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));

    QCoreApplication::setOrganizationName("Anonimous");
    QCoreApplication::setOrganizationDomain("dobrochan.ru");
    QCoreApplication::setApplicationName("Dobrochan Parser");


    QSettings settings;
    settings.beginGroup("notifications");
    if (!settings.contains("timeout")){
        settings.setValue("timeout", 10000);
    }
    settings.endGroup();

    std::cout << "Loading 1" << std::endl;
    parser* mainWindow = new parser(QApplication::desktop());

    std::cout << "Loading 2" << std::endl;
    mainWindow->show();


    return app.exec();
}
